class Solution
{
public:
    vector<vector<int>> construct2DArray(vector<int> &original, int m, int n)
    {
        if (original.size() != m * n)
        {
            return {};
        }
        vector<vector<int>> result;
        for (int i = 0; i < m; ++i)
        {
            result.emplace_back(original.begin() + n * i, original.begin() + n * (i + 1));
        }
        return result;
    }
};